home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8"?>
- <html><head><title>Not-Operator [Runtime]</title><meta name="filename" content="text/sbasic/common/03060400"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
-
- p.P1{
- }
- p.P2{
- }
- span.T1{
- font-weight:bold;}
- </style></head><body>
-
-
- <help:to-be-embedded Eid="not" xmlns:help="http://openoffice.org/2000/help">
- <p class="Head1"><help:link Id="66420">Not-Operator [Runtime]</help:link></p>
- <p class="Paragraph">Used to negate an expression by inverting the bit values.</p>
- </help:to-be-embedded>
- <p class="Paragraph"><span class="T1">Syntax</span>:</p>
- <p class="Paragraph">Result = Not Expression <help:key-word value="Not" tag="kw66420_1" xmlns:help="http://openoffice.org/2000/help"/></p>
- <p class="Paragraph"><span class="T1">Parameter</span>:</p>
- <p class="Paragraph">Result: Any numeric variable that contains the result of the negation.</p>
- <p class="Paragraph">Not Expression : Any expression to be negated.</p>
- <p class="Paragraph">When negating a Boolean expression, the value True becomes False, and vice versa.</p>
- <p class="Paragraph">In a bitwise negation each individual bit is inverted.</p>
- <p class="P2">Example:</p>
- <p class="PropText">Sub ExampleNot</p>
- <p class="PropText">Dim vA as Variant, vB as Variant, vC as Variant, vD as Variant</p>
- <p class="PropText">Dim vOut as Variant</p>
- <p class="PropText">vA = 10: vB = 8: vC = 6: vD = Null</p>
- <p class="PropText">vOut = Not vA REM Returns -11</p>
- <p class="PropText">vOut = Not(vC > vD) REM Returns 0</p>
- <p class="PropText">vOut = Not(vB > vA) REM Returns -1</p>
- <p class="PropText">vOut = Not(vA > vB) REM Returns 0</p>
- <p class="PropText">end Sub</p>
- <p class="PropText"/>
- </body></html>